Optimal. Leaf size=123 \[ \frac {B n \text {Li}_2\left (\frac {(b f-a g) (c+d x)}{(d f-c g) (a+b x)}\right )}{h (b f-a g)}-\frac {\log \left (1-\frac {(c+d x) (b f-a g)}{(a+b x) (d f-c g)}\right ) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{h (b f-a g)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.37, antiderivative size = 163, normalized size of antiderivative = 1.33, number of steps used = 8, number of rules used = 6, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {6742, 36, 31, 2503, 2502, 2315} \[ \frac {B n \text {PolyLog}\left (2,\frac {(f+g x) (b c-a d)}{(a+b x) (d f-c g)}+1\right )}{h (b f-a g)}+\frac {A \log (a+b x)}{h (b f-a g)}-\frac {A \log (f+g x)}{h (b f-a g)}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(f+g x) (b c-a d)}{(a+b x) (d f-c g)}\right )}{h (b f-a g)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 2315
Rule 2502
Rule 2503
Rule 6742
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(f+g x) (a h+b h x)} \, dx &=\int \left (\frac {A}{h (a+b x) (f+g x)}+\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h (a+b x) (f+g x)}\right ) \, dx\\ &=\frac {A \int \frac {1}{(a+b x) (f+g x)} \, dx}{h}+\frac {B \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x) (f+g x)} \, dx}{h}\\ &=-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}+\frac {(A b) \int \frac {1}{a+b x} \, dx}{(b f-a g) h}-\frac {(A g) \int \frac {1}{f+g x} \, dx}{(b f-a g) h}+\frac {(B (b c-a d) n) \int \frac {\log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(a+b x) (c+d x)} \, dx}{(b f-a g) h}\\ &=\frac {A \log (a+b x)}{(b f-a g) h}-\frac {A \log (f+g x)}{(b f-a g) h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}-\frac {(B (b c-a d) n) \operatorname {Subst}\left (\int \frac {\log \left (-\frac {(b c-a d) x}{d f-c g}\right )}{1+\frac {(b c-a d) x}{d f-c g}} \, dx,x,\frac {f+g x}{a+b x}\right )}{(b f-a g) (d f-c g) h}\\ &=\frac {A \log (a+b x)}{(b f-a g) h}-\frac {A \log (f+g x)}{(b f-a g) h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \log \left (-\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}+\frac {B n \text {Li}_2\left (1+\frac {(b c-a d) (f+g x)}{(d f-c g) (a+b x)}\right )}{(b f-a g) h}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.31, size = 304, normalized size = 2.47 \[ -\frac {-2 A \log (a+b x)+2 B \log (f+g x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )-2 B \log (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )+2 B n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )-2 B n \log (a+b x) \log (c+d x)+2 B n \log (c+d x) \log \left (\frac {d (a+b x)}{a d-b c}\right )+2 B n \text {Li}_2\left (\frac {g (a+b x)}{a g-b f}\right )-2 B n \log (a+b x) \log (f+g x)+2 B n \log (a+b x) \log \left (\frac {b (f+g x)}{b f-a g}\right )+B n \log ^2(a+b x)+2 A \log (f+g x)-2 B n \text {Li}_2\left (\frac {g (c+d x)}{c g-d f}\right )+2 B n \log (c+d x) \log (f+g x)-2 B n \log (c+d x) \log \left (\frac {d (f+g x)}{d f-c g}\right )}{2 h (b f-a g)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.86, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{b g h x^{2} + a f h + {\left (b f + a g\right )} h x}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A}{{\left (b h x + a h\right )} {\left (g x + f\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.36, size = 1447, normalized size = 11.76 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ A {\left (\frac {\log \left (b x + a\right )}{{\left (b f - a g\right )} h} - \frac {\log \left (g x + f\right )}{{\left (b f - a g\right )} h}\right )} - B \int -\frac {\log \left ({\left (b x + a\right )}^{n}\right ) - \log \left ({\left (d x + c\right )}^{n}\right ) + \log \relax (e)}{b g h x^{2} + a f h + {\left (b f h + a g h\right )} x}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{\left (f+g\,x\right )\,\left (a\,h+b\,h\,x\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________